<?php
declare(strict_types=1);

namespace App\Helper;

use Hyperf\HttpMessage\Cookie\Cookie;

class CookieHelper
{
    public static function genEmpty(string $name): Cookie
    {
        return self::genOne($name);
    }

    public static function genOne(string $name, string $value = '', int $ttl = 1): Cookie
    {
        return new Cookie($name, $value, $ttl + time(), '/', '', false, true);
    }
}
